#include <bits/stdc++.h>
using namespace std;
#define int long long
void solve()
{
    string s;
    cin>>s;
    int n=s.size();
    unordered_map<char, int>mp;
    for(int i=0;i<n;i++)
    {
        mp[s[i]]++;
    }
    int j=0;
    for(auto x:mp)
    {
        if(x.second%2)j++;
    }
    if(j>1)cout<<"No"<<endl;
    else 
    {
        if(n%2&&j==1)cout<<"Yes"<<endl;
        else if(n%2==0&&j==0)cout<<"Yes"<<endl;
        else cout<<"No"<<endl;
    }
}
signed main()
{
    //ios::sync_with_stdio(false);
    //cin.tie(nullptr);
    int T=1;
    cin>>T;
    while(T--)
    {
       solve();
    }
    return 0;
}